/**
 * Created By zhangQ 2018/3/19
 * 1.添加全局公共函数
 */
import store from '@/store'
import _ from 'lodash'

let powerUtil = {
  // 是否存在细粒度权限
  contains (key) {
    let currentUser = store.state.currentUser
    if (currentUser && currentUser.permission) {
      return _.some(currentUser.permission, { name: key, type: '4' })
    }
  }
}
export default powerUtil
